<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>纸质合同入库</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select.css">
	<style>
		.content-table-two{
			width: 1080px;
		}
		.content-table-two tbody tr td {
    		max-width: 300px;
    		min-width: 30px; 
    	}
		.content-table-two tbody tr td{
			width: 30px;
			padding-left: 12px;
			padding-right: 12px;
		}
		.content-table-two tbody tr td:first-child{
			width:75px;
		}
		.content-table-two tbody tr td:nth-child(2){
			width:130px;
		}
		.content-table-two tbody tr td:nth-child(4){
			width:60px;
		}
		.content-table-two tbody tr td:nth-child(10){
			width:60px;
		}
		.content-table-two tbody tr td:nth-child(11){
			width: 80px;
		}
		.content-table-two tbody tr td:last-child{
			width: 80px;
		}
		.content-btn {
		    border-top: 1px dashed #e6e6e6;
		    padding-top: 20px;
		    padding-bottom: 5px;
		}
		.export-btn {
		    float: left;
		    margin-top: 0px;
		}
	</style>
</head>
<body>
	<div class="main-content">
		<div class="main-bg">
			<p class="content-title">纸质合同入库</p>
			<button class="newset-btn icon-add clearfix matop" onclick="addTreasury()">+&nbsp;新增入库项目</button>
			<div class="content-form">
				<form id = "seachContractInboundForm">
					<ul>
						<li>
							<span class="text-name">项目名称：</span><input type="text" name = "projectname">
						</li>
						<li>
							<button class="btn-style-two" id = "seachContractInbound" onclick = "return false">搜索</button><i class="btn-operation maleft20">重置</i>
						</li>
					</ul>
				</form>
			</div>
			<div class="content-list">
				<div class="info-list">
					<table class="content-table-two" bindClick = "seachContractInbound" bindForm = "seachContractInboundForm" datatable = "true" cellspacing="0" cellpadding="0" dataAction = "/contractInbound/findList">
						<tbody style = "display:none;">
							<th title = "项目编码" name = "projectcode" type = "string"></th>
							<th title = "项目名称" name = "projectname" type = "string"></th>
							<th title = "已入库" name = "total" type = "Integer"></th>
							<th title = "总需配送数" name = "need" type = "Integer"></th>
							<th title = "可配送" name = "canDispatchnumber" type = "Integer"></th>
							<th title = "需配送" name = "nd" type = "Integer"></th>
							<th title = "已入档" name = "filein" type = "Integer"></th>
							<th title = "已作废" name = "cancel" type = "Integer"></th>
							<th title = "已回寄" name = "returns" type = "Integer"></th>
							<th title = "合同类型" name = "type" type = "dict" dictType = "contracttype"></th>
							<th title = "印刷厂" name = "printer" type = "dict" dictType = "printer"></th>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<!-- <div class="table-pages clearfix">
			<ul class="pages-list">
				<li><a href=""><</a></li>
				<li><a class="menu-active" href="">1</a></li>
				<li><a href="">2</a></li>
				<li><a href="">3</a></li>
				<li><a href="">...</a></li>
				<li><a href="">20</a></li>
				<li><a href="">></a></li>
			</ul>
		</div> -->
	</div>

	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script type="text/javascript" src = "js/table.js"></script>
	<script type="text/javascript" src = "js/allProduct.js"></script>
	<script>
		$('.multiselect').multiselect({setMaxOptionNum:4,selectedHtmlValue:''});
		$('#single').multiselect({multiple:false,selectedHtmlValue:'待下架',setWidth: 140+'px'});
		$('#single1').multiselect({multiple:false,selectedHtmlValue:'未配置',setWidth: 140+'px'});
		function tableCallBack(my){
			my.find("thead").find("tr").append("<td>操作</td>");
			var $tr = my.find("tbody").eq(1).find("tr");
			for(var i = 0 ; i < $tr.length ; i++){
				var html = "<td><i class = \"btn-operation\" onclick = \"addTreasury(" + i + ")\">追加入库</i><i class = \"btn-operation\" onclick = \"rkls(" + i + ")\">入库流水</i>";
				html += "<i class = \"btn-operation\" onclick = \"htmx(" + i + ")\" >合同明细</i></td>"
				$($tr[i]).append(html);
			}
		}
		function rkls(i){
			parent.setData($("table").getAllData()[i]);
			window.location.href = "runningWater.html";
		}
		function htmx(i){
			parent.setData($("table").getAllData()[i]);
			window.location.href = "contractDetails.html";
		}
		function addTreasury(i){
			parent.setData($("table").getAllData()[i]);
			window.location.href = "addTreasury.html";
		}
        function getHeight(){
            var myiframeH=$(".main-content").height();
            var _parent=$(window.parent.document);
            _parent.find('body').css('height',(myiframeH+150)+'px');
            _parent.find('.main-position').css('height',(myiframeH+100)+'px');
        };
        $('.main-content').resize(function(){
            getHeight();
        });
	</script>
</body>
</html>